package ynu;

import java.io.IOException;
import java.util.Scanner;

public class Demo {
    public static void main(String[] args) throws IOException {
        int flag1 = 1;
        do{
            System.out.println("\n===== 用户登录 =====");
            System.out.println("您的身份是：");
            System.out.println("1：管理员   2：经理    3：前台（请输入数字）");
            Menu m = new Menu();
            Scanner sc = new Scanner(System.in);
            int flag = sc.nextInt();
            String get = sc.nextLine();
            switch (flag){
                case 1:
                    m.administrator();
                    break;
                case 2:
                    m.manager();
                    break;
                case 3:
                    m.reception();
                    break;
                default:
                    System.out.println("无效的选择，请重试！");
            }
            System.out.println("继续登录请输入0，退出请输入任意数字");
            flag1 = sc.nextInt();
        }while (flag1==0);
    }
}
